<template>
  <Navbar/>
  <router-view v-slot="{ Component }">
    <transition name="fade-slide" mode="out-in">
      <component :is="Component" />
    </transition>
  </router-view>
  <AppFooter/>
</template>

<script setup>
import Navbar from './components/Navbar.vue';
import AppFooter from './components/Footer.vue';
</script>

<style lang="scss">
*{
  margin:0;
  padding:0;
  box-sizing: border-box;
}

:root {
  --primary-color: #409eff;
  --secondary-color: #2d3a4b;
  --text-color: #333;
  --text-light-color: #666;
  --border-color: #f0f0f0;
  --background-light: #f9f9f9;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  font-size: 14px;
  color: var(--text-color);
  background-color: #fff;
}

// 滚动条设计
::-webkit-scrollbar{
  width:6px;
  height:6px;
  position: absolute;
}

::-webkit-scrollbar-thumb{
  background: var(--primary-color);
  border-radius: 3px;
}

::-webkit-scrollbar-track{
  background:#eee;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
  
  &:hover {
    color: darken(#409eff, 10%);
  }
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.8em;
  color: var(--secondary-color);
}

// 过渡动画
.fade-slide-enter-active,
.fade-slide-leave-active {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fade-slide-enter-from {
  opacity: 0;
  transform: translateY(20px);
}

.fade-slide-leave-to {
  opacity: 0;
  transform: translateY(-20px);
}

// 全局响应式容器
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

// 全局响应式样式
@media (max-width: 992px) {
  .page-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-container {
    padding: 0 15px;
  }
}

@media (max-width: 576px) {
  .page-container {
    padding: 0 10px;
  }
}
</style>
